package org.jeecg.modules.business.job;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.business.job.service.SyncService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/*
 * 项目名称:    wms-server-jeecg
 * 接口描述:    定时同步sap仓库信息
 * 创建人员:    zhaojun
 * 创建时间:    2023-11-08
 */
@Service
@Slf4j
public class SyncWarehouseJob implements Job {

    @Autowired
    private SyncService syncService;

    @Override
    @Async
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("开始同步sap仓库信息");
        syncService.syncWarehouse();
        log.info("结束同步sap仓库信息");
    }
}
